package cn.xuziao.databasecourse.controller;

import cn.xuziao.databasecourse.pojo.SimpleInfo;
import cn.xuziao.databasecourse.service.GetModelAndView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

/**
 * @author xuziao
 * @date 2021/11/3 16:33
 */
@Controller
public class ViewController {

    GetModelAndView getModelAndView;

    @Autowired
    public ViewController(GetModelAndView getModelAndView) {
        this.getModelAndView = getModelAndView;
    }

    @GetMapping("/")
    public ModelAndView index() {
        return getModelAndView.getIndexModelAndView();
    }

    @GetMapping("/submit")
    public String submit() {
        return "landing";
    }



}
